<nav class="navbar navbar-expand-sm navbar-dark bg-primary fixed-top">
    <a class="navbar-brand" href="{{ url('/') }}">{{ config('app.name', 'Laravel') }}</a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navbarCollapse">
        <ul class="navbar-nav">
            <li class="nav-item">
                <a class="nav-link text-white text-center" href="{{ url('/list') }}">服务器列表</a>
            </li>
            <li class="nav-item">
                <a class="nav-link text-white text-center" href="{{ url('/install/win') }}">服务端搭建</a>
            </li>
            <li class="nav-item">
                <a class="nav-link text-white text-center" href="{{ url('/install/client') }}">335客户端</a>
            </li>
            <li class="nav-item">
                <a class="nav-link text-white text-center" href="{{ url('/Keira3') }}">Keira3</a>
            </li>
            <li class="nav-item">
                <a class="nav-link text-white text-center" target="_blank" href="http://bbs.wowmanage.cn/">论坛</a>
            </li>
        </ul>
        <ul class="navbar-nav ml-auto">
            @guest
                <li class="nav-item">
                    <a class="nav-link text-white text-center" href="{{ route('login') }}">登录</a>
                </li>
                @if (Route::has('register'))
                    <li class="nav-item">
                        <a class="nav-link text-white text-center" href="{{ route('register') }}">注册</a>
                    </li>
                @endif
            @else
                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                        {{ Auth::user()->name }}
                    </a>
                    <div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
                        @if(Auth::user()->is_admin == 1)
                            <a class="dropdown-item" href="{{ url('/admin/withdrawLogs') }}">提现审核</a>
                            <a class="dropdown-item" href="{{ url('/manager/authSingle') }}">独立版</a>
                            <div class="dropdown-divider"></div>
                        @endif
                            <a class="dropdown-item" href="{{ url('/manager/server') }}">服务器列表</a>
                            <a class="dropdown-item" href="{{ url('/manager/serverEngine') }}">特色服务端</a>
                            <a class="dropdown-item" href="{{ url('/manager/serverAuth') }}">服务端授权</a>
                            <a class="dropdown-item" href="{{ url('/manager/ad') }}">广告</a>
                            <a class="dropdown-item" href="{{ url('/manager/recommend') }}">推荐</a>
                            <div class="dropdown-divider"></div>
                            <a class="dropdown-item" href="{{ route('logout') }}" onclick="event.preventDefault();
                                                 document.getElementById('logout-form').submit();">退出</a>
                    </div>
                </li>

                <li class="nav-item">
                    <a class="nav-link text-white text-center" href="{{ url('/manager/recharge') }}">积分：<span id="remain_money">{{Auth::user()->remain_money}}</span></a>
                </li>
            @endguest
        </ul>
    </div>
</nav>
<form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
    @csrf
</form>
